<?php
	
	@session_start();
	require_once('../../lib/'.'BaseDir.inc.htm');
	require_once (EIU_LIB.'View.class.htm');	
	require_once (EIU_CLASS.'BlockClass.htm');	
	require_once (EIU_CLASS.'Category.htm');	
	
	/*require_once (EIU_CLASS.'LoginClass.htm');

	if(checkSession('category.htm')==true){
		$data1 = setSession();
	}
	*/
	
	//Lấy danh sách Block
	$blockObj = new block_class();	
	$BlockCode = "";
	$BlockName = "";
	$blockList = $blockObj->getBlockList($BlockCode,$BlockName);	
	
	//Lấy danh sách Cat
	$catObj = new category();
	$barcode=0;
	//$catList = $catObj->getCategoriesList();
	$catList = $catObj->getCATList($barcode);
	$data1["catList"] = json_encode($catList);
	
	//print_r($data1);
	//Xuất ra danh sách Block		
	$data1["blockList"] = json_encode($blockList);
	if(isset($_SESSION['userID'])&&!empty($_SESSION['userID']))
	{
		$data1['userId']=$_SESSION['userID'];
		$view = new View();
		$data1["number_row_on_static_screen"] = NUMBER_ROW_ON_STATIC_SCREEN;
		$view->showTmpl("reportNoBarcode.tmpl","n",$data1);
	}
	else
	{
		$strLocation = "login.htm";
		echo '<script type="text/javascript">';
		echo " location.href='".$strLocation."';";
		echo "</script>";
	}	
		
?>
